# -*- coding = utf-8 -*-
# @Time : 2023/6/8 13:46
# @Author : 龙王赘婿_彪少
# @File : pngtoico.py
# @Software: PyCharm

# 功能：
from PIL import Image


def png_to_ico(png_path, ico_path):
    img = Image.open(png_path)
    img.resize((256, 256))
    img.save(ico_path)


if __name__ == "__main__":
    png_path = 'E:/00_workspace/workspace_Qt/ioc图标/721954_1_0.png'
    ico_path = 'E:/00_workspace/workspace_Qt/ioc图标/721954_1_0.ico'
    png_to_ico(png_path, ico_path)